package com.thinktank.controller;

import static com.thinktank.util.DbUtil.*;

import java.io.*;
import java.sql.*;

import javax.servlet.*;
import javax.servlet.http.*;

import com.thinktank.vo.Board;
import com.thinktank.dao.BoardDao;

public class BoardEditController implements Controller {
	public String execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String bNo = request.getParameter("bNo");
		Connection con = getConnection();
		BoardDao dao = new BoardDao(con);
		Board board = dao.getBoard(bNo);
		close(con);
		
		request.setAttribute("board", board);
		
		return "boardEdit.jsp";
	}
}
